package com.qf.entity;

import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;

/*
杨威
2021/9/22
11:51
*/
public class Student {
//    @JsonProperty(value = "stuName1")  相当于换了个名 原名不能用了
    //@JsonIgnore 序列化和反序列化都关闭
    //@JSONField(serialize = false) 只关闭序列化
    private String stuName;
    private Integer stuAge;

    public Student() {
    }

    public String getStuName() {
        return stuName;
    }

    public void setStuName(String stuName) {
        this.stuName = stuName;
    }

    public Integer getStuAge() {
        return stuAge;
    }

    public void setStuAge(Integer stuAge) {
        this.stuAge = stuAge;
    }

    public Student(String name, Integer age) {
        this.stuName = name;
        this.stuAge = age;
    }

    @Override
    public String toString() {
        return "Student{" +
                "name='" + stuName + '\'' +
                ", age=" + stuAge +
                '}';
    }
}
